//
//  UILabel+Extension.swift
//  微博
//
//  Created by lipengfei on 15/9/6.
//  Copyright © 2015年 lipengfei. All rights reserved.
//

import UIKit
// MARK: - 为label 添加分类
extension UILabel{
    // 便利构造函数，用于初始化UILabel
    convenience init(title:String?, color:UIColor,fontSize:CGFloat,layoutWidth:CGFloat = 0){
        self.init()
        text = title
       
        textColor = color
        font = UIFont.systemFontOfSize(fontSize)
        if layoutWidth > 0{
            preferredMaxLayoutWidth = layoutWidth
            numberOfLines = 0
        }
        
    }
}
